home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / kernel / sprite / doversion < prev    next >
Encoding:
Text File  |  1992-06-04  |  1.7 KB  |  66 lines

  1. #! /sprite/cmds/csh -f
  2. #
  3. #    Usage: doversion releaseNumber versionInfo outFile
  4. #
  5. #    releaseNumber is the major number for the version (currently 1)
  6. #    versionInfo controls the minor number of the version. If it is
  7. #        TRUE then the version is incremented from the last build, if
  8. #        it is FALSE it is not incremented, and any other value is taken
  9. #        to be the version number to use.
  10. #    outFile is the name of the .h file to generate.
  11. #
  12. # $Header: /sprite/src/kernel/sprite/RCS/doversion,v 1.5 92/06/04 13:33:12 jhh Exp $ SPRITE (Berkeley)
  13. #
  14. # Copyright 1989 Regents of the University of California
  15. # Permission to use, copy, modify, and distribute this
  16. # software and its documentation for any purpose and without
  17. # fee is hereby granted, provided that the above copyright
  18. # notice appear in all copies.  The University of California
  19. # makes no representations about the suitability of this
  20. # software for any purpose.  It is provided "as is" without
  21. # express or implied warranty.
  22. #
  23.  
  24. set release = $1
  25. set versionInfo = $2
  26. set outFile = $3
  27.  
  28. set log = "no"
  29.  
  30. set version = `cat version`
  31. switch($versionInfo) 
  32.     case "TRUE":
  33.     case "true":
  34.     @ version++
  35.     echo $version > version
  36.     set log = "yes"
  37.     breaksw
  38.     case "FALSE":
  39.     case "false":
  40.     breaksw
  41.     default:
  42.     set version = $versionInfo
  43.     set log = "yes"
  44.     breaksw
  45. endsw
  46. echo $version > version
  47. if ($version < 10 ) then
  48.     set version = "00"$version
  49. else if ($version < 100) then
  50.     set version = "0"$version
  51. endif
  52.  
  53. if ("$log" == "yes") then
  54.     co -l versionLog
  55.     echo "" >> versionLog
  56.     echo "$release.$version    `date`" >> versionLog
  57.     echo ""
  58.     echo "Please log message for $release.$version in versionLog"
  59.     echo ""
  60. endif
  61.  
  62. echo $version
  63.  
  64. mkversion -p "SPRITE VERSION $release.$version (MACHINE)" > $outFile
  65.  
  66.